.site-wrapper {
  .search-wrapper {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    background-color: #fff;
    flex-wrap: wrap;
    box-shadow: -5px 0 5px 0 rgba(0, 0, 0, 0.15);
    z-index: 1080;

    .search-close {
      font-size: 3rem;
      outline: none;
    }

    .search-content {
      flex: 1 0 auto;
      width: 100%;
      margin: 2.5rem auto;
      padding: 5rem 1rem;

      .search-form {
        position: relative;

        .search-icon {
          position: absolute;
          top: 0.6rem;
          left: 0.5rem;
          font-size: 1.5rem;
          color: #777;
        }

        label {
          width: 100%;

          .search-input {
            font-size: 1.5rem;
            font-weight: 700;
            display: block;
            width: 100%;
            height: 3rem;
            padding: 0 0 0.1875rem 2.5rem;
            transition: border-color .3s ease;
            color: #333;
            border-width: 0 0 6px 0;
            border-style: solid;
            border-color: #999;
            border-radius: 0;
            outline: 0;
            flex: 0 0 100%;
          }
        }
      }

      .search-meta {
        font-size: 0.6875rem;
        font-weight: 700;
        display: block;
        width: 100%;
        margin: 0 auto;
        padding: 0.9375rem 0;
        text-align: left;
        text-transform: uppercase;
        color: #333;
      }

      .search-results {
        overflow: auto;
        height: 100vh;
        padding-bottom: 14rem;

        .ghost-search-item {
          margin: 0.9375rem 0 1.875rem 0;
          display: block;
          cursor: pointer;

          h2 {
            font-size: 1.25rem;
            color: #333;
            margin-bottom: 0.625rem;
          }

          span {
            font-size: 0.8125rem;
            color: #777;
            font-weight: 700;
          }
        }
      }
    }
  }
}

@mixin dark-mode {
  .site-wrapper {
    .search-wrapper {
      background-color: $dark-background-color;

      .search-close {
        color: $dark-main-color;
        text-shadow: none;
      }

      .search-content {
        .search-form {
          .search-icon {
            color: $dark-main-color;
          }

          label {
            .search-input {
              color: $dark-main-color;
              border-color: $dark-main-color;
              background-color: $dark-background-color;
            }
          }
        }

        .search-meta {
          color: $dark-main-color;
        }

        .search-results {
          .ghost-search-item {
            h2 {
              color: $dark-main-color;
            }

            span {
              color: $dark-main-color;
            }
          }
        }
      }
    }
  }
}

@media (prefers-color-scheme: dark) {
  @include dark-mode;
}

[data-theme="dark"] {
  @include dark-mode;
}
